<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
//=============================================================//
//Query File for Crontab Control (BigDaddy v2)
//Duleepa Wijyawardhana, 15.03.2004
//=============================================================//

switch($_REQUEST["action"])
{
    case "addini":
		$aInfo["name"] = $_POST["name"];
		$aInfo["iniID"] = $_POST["iniID"];
		$aInfo["inifile"] = $_POST["inifile"];
		$BigDaddyControl->SetIniFile($aInfo);
		$redirectTo="page=MonIniFiles";
        break;
    case "editini":
		$aInfo["name"] = $_POST["name"];
		$aInfo["iniID"] = $_POST["iniID"];
		$aInfo["inifile"] = $_POST["inifile"];
		
		$BigDaddyControl->SetIniFile($aInfo, $aInfo["iniID"]);
		$redirectTo="page=MonIniFiles";
        break;
    case "deleteini":
		$BigDaddyControl->RemoveIniFile($_REQUEST["iniID"]);
		$redirectTo="page=MonIniFiles";
        break;
}

if ($redirectTo!="")
{
    header("Location: /index.html?".$redirectTo);
    exit;
}
else
{
    header("Location: /index.html");
    exit;
}

?>
